package com.xpgk.mvc.organizationLevel;

import com.jfinal.log.Log;
import com.xpgk.annotation.Table;
import com.xpgk.mvc.base.BaseModel;

/**
 * 机构层级权限model
 * 
 */
@SuppressWarnings("unused")
@Table(tableName = OrganLevelRight.table_name)
public class OrganLevelRight extends BaseModel<OrganLevelRight> {

	private static final long serialVersionUID = -8583963664880961788L;

	private static final Log log = Log.getLog(OrganLevelRight.class);

	public static final OrganLevelRight dao = new OrganLevelRight().dao();

	/**
	 * 表名称
	 */
	public static final String table_name = "sys_organ_level_right";

	/**
	 * 字段描述：该条数据添加人员is  字段类型：character varying 长度：32
	 */
	public static final String column_createId = "createId";
	/**
	 * 字段描述：该条数据添加时间  字段类型：datetime 长度：0
	 */
	public static final String column_createDate = "createDate";
	/**
	 * 字段描述：该条数据更新人员id  字段类型：character varying 长度：100
	 */
	public static final String column_updateId = "updateId";
	/**
	 * 字段描述：该条数据更新时间  字段类型：datetime 长度：0
	 */
	public static final String column_updateDate = "updateDate";
	
	/**
	 * 字段描述：主键 字段类型：character varying 长度：32
	 */
	public static final String column_ids = "ids";

	/**
	 * 字段描述：
	 */
	public static final String column_levelIds = "levelIds";

	/**
	 * 字段描述：
	 */
	public static final String column_rightIds = "rightIds";

	/**
	 * 描述：联合 主键查询
	 */
	public static final String sqlId_findByIds = "sys.organ_level_right.findByIds";

	/**
	 * 描述：查询根节点
	 */
	public static final String sqlId_rightRootNode = "sys.organ_level_right.rightRootNode";

	/**
	 * 描述：rightChildTree子节点查询
	 */
	public static final String sqlId_rightChildNode = "sys.organ_level_right.rightChildNode";
	
	/**
	 * 描述：查询根节点
	 */
	public static final String sqlId_rightRootNodeSystem = "sys.organ_level_right.rightRootNodeSystem";

	/**
	 * 描述：rightChildTree子节点查询
	 */
	public static final String sqlId_rightChildNodeSystem = "sys.organ_level_right.rightChildNodeSystem";

	/**
	 * 描述：添加代理下拉跟节点
	 */
	public static final String sqlId_selectRightRootNode = "sys.organ_level_right.selectRightRootNode";

	/**
	 * 描述：添加代理下拉子节点
	 */
	public static final String sqlId_selectRightChildNode = "sys.organ_level_right.selectRightChildNode";
	
	/**
	 * 描述：修改代理下拉跟节点
	 */
	public static final String sqlId_updateRightRootNode = "sys.organ_level_right.updateRightRootNode";

	/**
	 * 描述：修改代理下拉子节点
	 */
	public static final String sqlId_updateRightChildNode = "sys.organ_level_right.updateRightChildNode";

	/**
	 * 描述：根据rightIds查询
	 */
	public static final String sqlId_byRightIds = "sys.organ_level_right.byRightIds";

	/**
	 * 描述：根据levelIds查询
	 */
	public static final String sqlId_byLevelIds = "sys.organ_level_right.byLevelIds";

	/**
	 * 描述：countChild查询
	 */
	public static final String sqlId_countChild = "sys.organ_level_right.countChild";

	public OrganLevelRight findByIds(String rightIds, String levelIds) {
		String sql = getSqlMy(sqlId_findByIds);
		return dao.findFirst(sql, rightIds, levelIds);
	}
}
